/**
 * @description: Application
 */

import type { CommonAPI } from '../types/all'
import { defHttp } from '../http'
/**
 * @description: Application
 */

/** 获取应用详情 */
export const getApplicationDetailApi: CommonAPI<
  '/v1/application',
  'get'
> = params => defHttp.get(`/v1/application`, { params })

/** 更新应用 */
export const updateApplicationApi: CommonAPI<'/v1/application', 'put'> = data =>
  defHttp.put(`/v1/application`, data)

/** 批量更新应用权限 */
export const updateApplicationPermissionBatchApi: CommonAPI<
  '/v1/application/permission/batch',
  'put'
> = data => defHttp.put(`/v1/application/permission/batch`, data)

/** 获取应用权限信息 */
export const getApplicationPermissionsDetailApi: CommonAPI<
  '/v1/application/permissions',
  'get'
> = params => defHttp.get(`/v1/application/permissions`, { params })

/** 获取应用信息 */
export const getApplicationsApi: CommonAPI<
  '/v1/applications',
  'get'
> = params => defHttp.get(`/v1/applications`, { params })
